/*
 * ChooseBankCardActivity.java
 * business
 *
 * Created by ChenTao on 2017/2/21.
 *
 * Copyright (c) 2017年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.main.shoppingcart.choosebankcard;

import android.app.Activity;
import android.content.Intent;

import com.yidiandao.business.R;
import com.yidiandao.business.base.BaseActivity;
import com.yidiandao.business.utils.ActivityUtils;

public class ChooseBankCardActivity extends BaseActivity {

    private ChooseBankCardFragment mChooseBankCardFragment;

    public static void actionStart(Activity activity) {
        Intent intent = new Intent(activity, ChooseBankCardActivity.class);
        activity.startActivity(intent);
    }

    @Override
    protected void initFragment() {
        mChooseBankCardFragment =
                (ChooseBankCardFragment) getSupportFragmentManager().findFragmentById(
                        R.id.container_choose_bank_card);

        if (mChooseBankCardFragment == null) {
            mChooseBankCardFragment = ChooseBankCardFragment.getInstance();
            ActivityUtils.addFragmentToActivity(getSupportFragmentManager(),
                    mChooseBankCardFragment, R.id.container_choose_bank_card);
        }

    }

    @Override
    protected void initPresenter() {
        new ChooseBankCardPresenter(mChooseBankCardFragment);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_choose_bank_card;
    }
}
